/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024.
 * Description: header of hpvisor hrtimer
 * Author: wanglinhui <wanglinhui@huawei.com>
 * Create: 2024-01-26
 */

#ifndef HPVISOR_HRTIMER_H
#define HPVISOR_HRTIMER_H

#include <linux/hrtimer.h>

struct hpvisor_hrtimer {
	bool stopped;
	u64 applied_time;
	struct task_struct *task;
	struct hrtimer timer;
	int show_stack_times;
};

extern void hpvisor_hrtimer_init(struct hpvisor_hrtimer *hpv_timer);
extern void hpvisor_hrtimer_start(struct hpvisor_hrtimer *hpv_timer,
	struct task_struct *task);
extern void hpvisor_hrtimer_cancel(struct hpvisor_hrtimer *hpv_timer);

#endif /* HPVISOR_HRTIMER_H */
